package com.qianli.cashmama.trade.common.exceptions;

import com.qianli.cashmama.trade.common.error.TradeErrorCodeEnum;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/7/25
 * Time: 下午2:31
 */
public class TradeException extends RuntimeException {

    private TradeErrorCodeEnum errorEnum;

    public TradeException(TradeErrorCodeEnum TradeErrorEnum) {
        super(TradeErrorEnum.getMsg());
        this.errorEnum = TradeErrorEnum;
    }

    public TradeException(TradeErrorCodeEnum enums, String message) {
        super(message);
        this.errorEnum = enums;
    }

    public TradeErrorCodeEnum getErrorEnum() {
        return errorEnum;
    }
}
